#ifndef MAINWINDOW_H
#define MAINWINDOW_H

// C++ Libs
#include <stdlib.h>
#include <stdio.h>

// Qt Libs
#include <QMainWindow>
#include <QTextEdit>
#include <QGraphicsScene>
#include <QGraphicsView>
#include <QFileDialog>
#include <QPixmap>
#include <QGraphicsPixmapItem>
#include <QMessageBox>
#include <QtCore>

// OpenCV
#include "cv.h"
#include "highgui.h"
#include "opencv2/objdetect/objdetect.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/opencv.hpp"
#include "opencv2/core/core.hpp"

using namespace std;
using namespace cv;

namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT
    
    public:
        explicit MainWindow(QWidget *parent = 0);
        ~MainWindow();


    public slots:


    private slots:
        void on_loadBtn_clicked();
        void activeWCVideoStream();
        void activeIPAlgo();
        void displayQImage(QImage qImg);
        void displayMatImage(Mat matImg);
        void displayIplImage(IplImage *iplimage);

        // Test
        void on_comboBox_currentIndexChanged(int index);

        // Get skin -> get hand contour
        bool R1(int R, int G, int B);
        bool R2(float Y, float Cr, float Cb);
        bool R3(float H, float S, float V);
        Mat  GetSkin(Mat const &src);
        void handContourDetector(Mat matImg);
        Mat contourDetector(Mat matImg);

    private:
        Ui::MainWindow *ui;
        QGraphicsView *view;
        bool cameraBusy;
        Mat origImg;

        // Test

};



#endif // MAINWINDOW_H
